<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en" th:replace="header/header :: header(${title} != null ? ${title} : '帅小铺-实体商户社群服务平台',
'/assets/layui/css/layui.css,
/assets/tinymce/skins/ui/oxide/content.min.css?v=5.0.4,
/assets/module/admin.css,
/assets/css/comment.css',
'/assets/js/timeformat.js,
/assets/libs/index/app.js?v=2')">
</head>
<body class="theme-my" data-theme="theme-my">
<th:block th:if="${resources == null}">
<style>
#root, body, html{
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}
.preview-error {
    font-family: -apple-system,helvetica,sans-serif;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 176px;
}
.preview-error .preview-error-icon {
    width: 100px;
    height: 72px;
    margin-bottom: 4px;
}
.preview-error .preview-error-message {
    font-size: 15px;
    color: #999;
    margin-bottom: 24px;
}
.preview-error .tt-darkmode-preview-error-btn {
    color: #fff;
}
.preview-error .preview-error-btn {
    height: 28px;
    border-radius: 2px;
    background-color: #f04142;
    font-size: 14px;
    line-height: 28px;
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
}
</style>
</th:block>
<!-- 顶部导航 statr -->
<div th:replace="common/index/indexbar :: indexbar"></div>
<!-- 顶部导航 end -->
<th:block th:if="${resources != null}">
	<!--头条主体 statr -->
	<div class="content">
		<input type="hidden" th:value="${resources.videoEtag}" id="videoEtag">
		<div class="wrapper contDiaryTop">
			<th:block th:if="${user != null}">
				<input type="hidden" th:value="${user.userId}" id="uuserId">
				<input type="hidden" th:value="${user.avatar}" id="uavatar">
				<input type="hidden" th:value="${user.nickName}" id="unickName">
			</th:block>
			<!-- 概况 start -->
			<div class="general-item general-intro" style="margin-bottom: 20px;" id="intro" th:if="${resources.columnId != 1}">
				<h3>
					<em></em>概况
				</h3>
				<ul class="general-item-wrap">
					<li class="intro-item" th:if="${resources.rent != null && resources.rent != ''}">
						<span class="title">租金：</span> 
						<span class="content" th:text="${resources.rent}"></span>
					</li>
					<li class="intro-item" th:if="${resources.totalPrice != null && resources.totalPrice != ''}">
						<span class="title">总价：</span> 
						<span class="content" th:text="${resources.totalPrice}"></span>
					</li>
					<li class="intro-item" th:if="${resources.transferFee != null && resources.transferFee != ''}">
						<span class="title">转让费：</span> 
						<span class="content" th:text="${resources.transferFee}"></span>
					</li>
					<li class="intro-item" th:if="${resources.area != null && resources.area != ''}">
						<span class="title">面积：</span> 
						<span class="content" th:text="${resources.area}"></span>
					</li>
					<li class="intro-item" th:if="${resources.propertyName != null && resources.propertyName != ''}">
						<span class="title">楼盘名称：</span> 
						<span class="content" th:text="${resources.propertyName}"></span>
					</li>
					<li class="intro-item" th:if="${resources.serviceItemsName != null && resources.serviceItemsName != ''}">
						<span class="title">服务项目：</span> 
						<span class="content" th:text="${resources.serviceItemsName}"></span>
					</li>
					<li class="intro-item" th:if="${resources.address != null && resources.address != ''}">
						<span class="title">地址：</span> 
						<span class="content" th:if="${resources.countyName != null && resources.countyName != ''}" th:text="${resources.countyName + '-' + resources.address}"></span>
						<span class="content" th:if="${resources.countyName == null || resources.countyName == ''}" th:text="${resources.address}"></span>
					</li>
					<li class="intro-item" th:if="${resources.shopNum != null && resources.shopNum != ''}">
						<span class="title">商品数量：</span>
						<span class="content" th:text="${resources.shopNum}"></span>
					</li>
					<li class="intro-item" th:if="${resources.rangTime != null && resources.rangTime != ''}">
						<span class="title">活动时间：</span> 
						<span class="content" th:text="${resources.rangTime}"></span>
					</li>
					<li class="intro-item" th:if="${resources.pickUp != null && resources.pickUp != ''}">
						<span class="title">取货方式：</span> 
						<span class="content" th:text="${resources.pickUp}"></span>
					</li>
					<li class="intro-item" th:if="${resources.contacts != null && resources.contacts != ''}">
						<span class="title">联系人：</span> 
						<span class="content" th:text="${resources.contacts}"></span>
					</li>
					<li class="intro-item" th:if="${resources.telephone != null && resources.telephone != ''}">
						<span class="title">联系电话：</span> 
						<span class="content" id="btnshow">
							<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-event="shoePhone">
								<i class="layui-icon layui-icon-cellphone-fine"></i> 
								电话联系TA
							</button>
						</span>
						<span class="content layui-hide" id="telephone" th:text="${resources.telephone}"></span>
					</li>
				</ul>
			</div>
			<!-- 概况 end -->
		
			<!-- 详情页  -->
			<div class="detailsPage">
				<!-- 文章内容 start -->
				<div class="detailsCon" id="detailsCon">
					<h1 class="detailsCon-h1" th:attr="data-articleid=${resources.articleId}" th:text="${resources.title}"></h1>
					<div class="detailsCon-info">
						<div class="detailsCon-infoL">
							<div>
								<a class="detailsCon-infoLA" th:if="${resources.user != null}" th:href="${'/t/' + resources.user.userId}"> 
									<img class="detailsCon-infoLAImg" th:src="${resources.user.avatar}" alt="" /> 
									<div class="detailsCon-infoLAd">
									    <span class="detailsCon-infoLAs" th:text="${resources.user.nickName}"></span>
									    <span class="detailsCon-infoLAs2" th:text="${resources.user.label == null || resources.user.label == '' ? '暂无' : resources.user.label}"></span>
									</div>
								</a>
							</div>
							<ul class="detailsCon-infoL-ul" th:if="${not #lists.isEmpty(resources.tbs)}">
							    <li class="detailsCon-infoL-li" th:each="lab:${resources.tbs}" th:text="${lab}"></li>
							</ul>
						</div>
						<div class="detailsCon-infoR">
							<ul>
								<th:block th:if="${user == null}">
									<li class="tag detailsCon-infoRLi" lay-event="follow" th:attr="data-userid=${resources.user.userId}">							
										<span>+关注</span>
									</li>
								</th:block>
								<th:block th:if="${user != null}">
									<li class="tag detailsCon-infoRLi" lay-event="follow" th:attr="data-userid=${resources.user.userId}" th:if="${!resources.user.mutual && resources.user.userId != user.userId}">							
										<span>+关注</span>
									</li>
									<li class="tag detailsCon-infoRLi" lay-event="unfollow" th:attr="data-userid=${resources.user.userId}" th:if="${resources.user.mutual && resources.user.userId != user.userId}">							
										<span>✓已关注</span>
									</li>
								</th:block>
								<li class="detailsCon-infoRLi">
									<span class="detailsCon-infoRLiS" th:text="${#temporals.format(resources.updateTime,'yyyy-MM-dd HH:mm')}"></span>
								</li>
								<li class="detailsCon-infoRLi">
									<span class="detailsCon-infoRLiS" th:text="'阅读量：' + ${resources.readSizeFormat}"></span>
								</li>
							</ul>
						</div>
					</div>
					<!-- 内容详情 statr -->
					<div class="detailsCon-Text">
						<article style="margin-top: 10px;" th:utext="${resources.content}"></article>
					</div>
					<!-- 内容详情 end -->
					<!-- 版权说明  statr-->
					<div class="copExplain">
						<div class="copExplainL" th:if="${resources.columnId == 1}">
							<p class="copExplainL-p">
								*免责声明：此文章内容为
								<span th:if="${resources.articleType == '0'}">原创</span>
								<span th:if="${resources.articleType == '1'}">转载</span>
								<span th:if="${resources.articleType == '2'}">翻译</span>
								作品，凡注明“来源：帅小铺”转载请注明出处；文章内容仅供参考，不构成投资建议，也不代表帅小铺赞同其观点。
								·<a class="copExplainL-pA" href="">帅小铺</a>。
							</p>
						</div>
					</div>
					<!-- 版权说明  end-->

					<!-- 喜欢收藏  start-->
					<div class="likeCollection">
						<div class="likeCollectionL">
							<th:block th:if="${resources.vote}">
								<div class="clickLike clickLikeXz" lay-event="vote_cancel" th:attr="data-articleId=${resources.articleId}">
							        <i class="layui-icon layui-icon-praise" style="font-size: 20px;color:#ff4200;vertical-align: middle;"></i> 
							        <p class="clickLike-p">
							        	<span class="clickLike-ps" th:text="${resources.voteSizeFormat}"></span>
							        </p>
						    	</div>
							</th:block>
							
							<th:block th:unless="${resources.vote}">
								<div class="clickLike" lay-event="vote" th:attr="data-articleId=${resources.articleId}">
							        <i class="layui-icon layui-icon-praise" style="font-size: 20px;vertical-align: middle;"></i>  
							        <p class="clickLike-p">
							       		<span class="clickLike-ps" th:text="${resources.voteSizeFormat}"></span>
							        </p>
						    	</div>
							</th:block>
						    
						    <th:block th:if="${resources.collect}">
							    <div class="clickLike clickLikeXz" lay-event="collect_cancel" th:attr="data-articleId=${resources.articleId}">
							        <i class="layui-icon layui-icon-star-fill" style="font-size: 20px;vertical-align: middle;"></i>
							        <p class="clickLike-p">已收藏</p>
							    </div>
						    </th:block>
						    
						    <th:block th:unless="${resources.collect}">
							    <div class="clickLike" lay-event="collect" th:attr="data-articleId=${resources.articleId}">
							        <i class="layui-icon layui-icon-star-fill" style="font-size: 20px;vertical-align: middle;"></i>
							        <p class="clickLike-p">收藏</p>
							    </div>
						    </th:block>
						    <div class="clickLike">
						        <i class="layui-icon layui-icon-reply-fill" style="font-size: 20px;vertical-align: middle;"></i>
						        <p class="clickLike-p" th:text="${resources.commentNum}"></p>
							</div>
						    <div class="clickLike dropdown-menu">
			                    <img alt="" src="/assets/images/icon/jb.png" width="20px" height="20px">
						        <p class="clickLike-p">举报</p>
			                    <div class="dropdown-menu-nav dropdown-bottom-center layui-anim-upbit layui-anim" style="width: 600px;padding: 0 10px 10px 10px;">
			                        <div class="dropdown-anchor"></div>
			                        <form class="layui-form layui-text" id="reportfilterForm" lay-filter="reportfilterForm">
			                        	<input type="hidden" id="articleId" name="articleId" th:value="${resources.articleId}"/>
			                        	<div class="layui-form-item">
									    	<label class="layui-form-label" style="width:120px;">举报文章问题</label>
									    	<div class="layui-input-block">
									      		<input type="checkbox" name="reportContent" value="侵权（抄袭、侵犯名誉等）" title="侵权（抄袭、侵犯名誉等）" lay-skin="primary"/>
									      		<input type="checkbox" name="reportContent" value="低俗色情" title="低俗色情" lay-skin="primary"/>
									      		<input type="checkbox" name="reportContent" value="内容敷衍、不实" title="内容敷衍、不实" lay-skin="primary"/>
									      		<input type="checkbox" name="reportContent" value="内含违法犯罪" title="内含违法犯罪" lay-skin="primary"/>
									      		<input type="checkbox" lay-filter="reportfilter" name="reportContent" value="其他问题" title="其他问题" lay-skin="primary"/>
									    	</div>
									  	</div>
									  	<div class="layui-form-item layui-form-text layui-hide" id="otherReasons">
										    <label class="layui-form-label" style="width:110px;">其他原因</label>
											<div class="layui-input-block">
										      <textarea name="desc" placeholder="请具体说明问题，我们将尽快处理" class="layui-textarea"></textarea>
										    </div>
										</div>
										<div class="layui-form-item">
											<div class="layui-input-block">
										       <button class="layui-btn" lay-submit lay-filter="reportSubmit">提交</button>
										    </div>
										</div>
			                        </form>
			                    </div>
			                </div>
						    
						</div>
					</div>
					<!-- 喜欢收藏  end -->
				</div>
				
				<div class="evaluate">
					<div class="commentAll">
					    <!--评论区域 begin-->
					    <div class="reviewArea clearfixc layui-form" lay-filter="commentForm">
					        <textarea class="layui-textarea" name="content" placeholder="发表你的精彩评论" maxlength="100"></textarea>
					        <button class="layui-btn plBtn" lay-submit lay-filter="comment" id="commentbtn">评论</button>
					    </div>
					    <!--评论区域 end-->
					    <!--回复区域 begin-->
					    <div class="comment-show" id="commentShow">
					       
					    </div>
					    <!--回复区域 end-->
					</div>
				
				</div>
				
				<!-- 文章内容 end -->
			</div>
			<!-- 详情页 end -->
		</div>
	</div>
	<!--头条主体 end -->
	<!-- 回到顶部 start -->
	<div th:replace="common/channel/backTop :: backTop"></div>
	<!-- 回到顶部 end -->
	<!-- 页脚 start -->
	<div th:replace="common/footer :: footer"></div>
</th:block>
<th:block th:if="${resources == null}">
	<div id="root">
		<div class="App">
			<div class="preview-error">
				<img class="preview-error-icon" alt="error-icon" src="/assets/images/error.8dbcb46d.png">
				<div class="preview-error-message">加载失败，请重试</div>
				<div class="tt-darkmode-preview-error-btn preview-error-btn">重试</div>
			</div>
		</div>
	</div>
</th:block>

	
<!-- 页脚 end -->
<script th:inline="javascript">
  layui.use(['Player', 'form', 'ax', 'mynotice', 'admin', 'dataGrid'], function () {
        var Player = layui.Player;
        var form = layui.form;
        var $ax = layui.ax;
        var mynotice = layui.mynotice;
        var $ = layui.jquery;
        var admin = layui.admin;
        var dataGrid = layui.dataGrid;
        
        var etagsStr = $('#videoEtag').val();
        var uid = $('#uuserId').val();
        var avatar = $('#uavatar').val();
        var nickName = $('#unickName').val();
        var etags = [];
        if(etagsStr){
        	etags = JSON.parse(etagsStr);
        }
        $.each(etags, (i, v) => {
        	var elem = '#v_' + v;
        	$(elem).removeAttr("style","");
        	var poster = $(elem).children("video").eq(0).attr('poster');
        	var src = $(elem).children("video").eq(0).children("source").eq(0).attr('src');
        	$(elem).html('');
        	$(elem).css("margin-bottom","10px");  
        	// 视频播放器
 	        var player = new Player({
 	            id: "v_" + v,
 	            url: src,  // 视频地址
 	            //poster: poster,  // 封面
 	            videoInit: true,
 	            fluid: true,  // 宽度100%
 	            width: 600, // 播放器的宽度 默认600
 	            height: 337.5, // 播放器的高度 默认337.5
 	            playbackRate: [0.5, 1, 1.5, 2],  // 开启倍速播放
 	            pip: true,  // 开启画中画
 	            lang: 'zh-cn'
 	        });
        })
        
        $('.tt-darkmode-preview-error-btn').on('click', function(){
        	$('.preview-error').empty();
        	window.location.reload();
        })
        
        // 评论
        var ins = dataGrid.render({
   	        elem: '#commentShow',  // 容器
   	        templet: '#commres',  // 模板
   	        url: '/zp/comment/list?id=' + $('#articleId').val(),  // 数据接口
   	        where:{userId: $('#authuserid').val()},
   	        loadMore: {
   	        			limit: 30,
   	        	 		text: '加载更多',
   	    	        	loadingText: '努力加载中...',
   	    	        	noMoreText: '我也是有底线的^_^',
   	    	        	errorText: '加载失败了v_v'
   	        		 },  // 开启分页
   	        done: function(res, curr, count){
   	        	//$('#userFollow').text(count);
   	        }
   	    });
       
        <!--点击评论创建评论条-->
        form.on('submit(comment)', function(data){
        	var _that = this;
        	var now = handlePublishTimeDesc(new Date());
        	//获取输入内容
        	var oSize = data.field.content;
        	var content = oSize.replace(/(^\s*)|(\s*$)/g, "");
        	if(content == ''){
        		mynotice.infoc('请输入评论内容！');
        		return false;
        	}
        	
        	admin.btnLoading('#commentbtn');
        	data.field.content = content;
        	//动态创建评论模块
        	var ajax = new $ax('/zp/comment/add', 'post', function (res) {
        		admin.btnLoading('#commentbtn', false); 
        		form.val("commentForm", {"content": ""});
        		add(res.data);
        		mynotice.success('评论成功');
		    }, function (res) {
		    	admin.btnLoading('#commentbtn', false); 
		    	mynotice.error(res.msg);
		    });
        	data.field.articleId = $('#articleId').val();
        	ajax.setData(JSON.stringify(data.field));
		    ajax.start();
		    function add(cid){
		    	var oHtml = '<div class="comment-show-con clearfix" data-id="'+ cid +'">'+
      				'<a class="comment-show-con-img pull-left" target="_blank" href="/t/'+ uid +'">'+
      					'<img src="'+ avatar +'" class="avatarimg" alt="">'+
      				'</a>'+ 
      				'<div class="comment-show-con-list pull-left clearfix">'+
      					'<div class="pl-text clearfix">'+ 
      						'<a href="/t/'+ uid +'" target="_blank" data-cid="'+ cid +'" data-id="'+ uid +'" class="comment-size-name">'+ nickName +'：</a>'+ 
      						'<span class="my-pl-con">&nbsp;'+ oSize +'</span>'+ 
      					'</div>'+
      					'<div class="date-dz">'+
      						'<span class="date-dz-left pull-left comment-time">'+ now +'</span>'+ 
      						'<div class="date-dz-right pull-right comment-pl-block">'+
      							'<a href="javascript:;" data-id="'+ cid +'" class="removeBlock">删除</a>'+ 
      							'<a href="javascript:;" class="date-dz-pl pl-hf hf-con-block pull-left">回复</a>'+ 
      							'<span class="pull-left date-dz-line">|</span>'+ 
      							'<a href="javascript:;" class="date-dz-z pull-left">'+
      								'<i class="layui-icon layui-icon-praise"></i> (<i class="z-num">0</i>)'+
      							'</a>'+ 
      						'</div>'+
      					'</div>'+
      					'<div class="hf-list-con"></div>'+
      				'</div>'+
      			'</div>';
		      	if(oSize.replace(/(^\s*)|(\s*$)/g, "") != ''){
		          	$(_that).parents('.reviewArea ').siblings('.comment-show').prepend(oHtml);
		      	}
		    }
       	  	return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
       	});
        
        <!--点击回复动态创建回复块-->
        $('.comment-show').on('click','.pl-hf',function(){
            //获取回复人的名字
            var fhName = $(this).parents('.date-dz-right').parents('.date-dz').siblings('.pl-text').find('.comment-size-name').html();
            //回复@
            var fhN = '回复@' + fhName;
            var fhHtml = '<div class="hf-con pull-left layui-form" lay-filter="hfcommentform">'+
            				'<textarea class="layui-textarea" name="content" maxlength="100" placeholder=""></textarea>'+
            				'<button class="layui-btn plBtn" lay-submit lay-filter="hfcomment">评论</button>'+
            			'</div>';
            //显示回复
            if($(this).is('.hf-con-block')){
                $(this).parents('.date-dz-right').parents('.date-dz').append(fhHtml);
                $(this).removeClass('hf-con-block');
                $(this).parents('.date-dz-right').siblings('.hf-con').find('.pre').css('padding','6px 15px');
                //input框自动聚焦
                $(this).parents('.date-dz-right').siblings('.hf-con').find('.layui-textarea').val('').focus().val(fhN);
            }else {
                $(this).addClass('hf-con-block');
                $(this).parents('.date-dz-right').siblings('.hf-con').remove();
            }
        });
        
        <!--评论回复块创建-->
        form.on('submit(hfcomment)', function(data){
        	 var oThis = $(this);
             var now = handlePublishTimeDesc(new Date());
             // 回复用户昵称
             var oHfName = $(this).parents('.hf-con').parents('.date-dz').siblings('.pl-text').find('.comment-size-name').html();
             // 回复用户的Id
             var userId = $(this).parents('.hf-con').parents('.date-dz').siblings('.pl-text').find('.comment-size-name').data('id');
             var pcid = $(this).parents('.hf-con').parents('.date-dz').siblings('.pl-text').find('.comment-size-name').data('cid');
             var acid = $($(this).parents('.comment-show-con')[0]).data('id');
             var oAllVal = '回复@' + oHfName;
             //获取输入内容
             var oHfVal = data.field.content;
             data.field.touserId = userId;
             data.field.pcid = pcid;
             data.field.acid = acid;
             oHfVal = oHfVal.replace(/^ +| +$/g,'');
             if(oHfVal == '' || oHfVal == oAllVal){
            	 mynotice.infoc('请输入评论内容！');
  	        		return false;
             }
             var tores = {};
                var arr;
                var ohfNameArr;
                if(oHfVal.indexOf("@") == -1){
               	 tores['atName'] = '';
               	 tores['hfContent'] = oHfVal;
                }else {
                    arr = oHfVal.split('：');
                    ohfNameArr = arr[0].split('@');
                    tores['hfContent'] = arr[1];
                    tores['atName'] = ohfNameArr[1];
                }
             data.field.content = tores.hfContent;
             var ajax = new $ax('/zp/comment/reply', 'post', function (res) {
 	        		//admin.btnLoading('#commentbtn', false); 
 	        		form.val("hfcommentform", {"content": ""});
 	        		add(res.data, tores);
 	        		mynotice.success('评论成功');
		    }, function (res) {
		    	//admin.btnLoading('#commentbtn', false); 
		    	mynotice.error(res.msg);
		    });
 	        	data.field.articleId = $('#articleId').val();
 	        	ajax.setData(JSON.stringify(data.field));
		    ajax.start();
             
            function add(cid, res){
            	 var oAt = '';
                 var oHf = '';
                    if(res.atName == ''){
                        oAt = res.hfContent;
                    }else {
                        oAt = '回复<a href="/t/'+ userId +'" target="_blank" class="atName">@' + res.atName + '</a> : ' + res.hfContent;
                    }
                    oHf = res.hfName;

                 var oHtml = '<div class="all-pl-con">'+
                 				'<div class="pl-text hfpl-text clearfix">'+
                 					'<a href="/t/'+ uid +'" target="_blank" data-cid="'+ cid +'" data-id="'+ uid +'" class="comment-size-name">'+ nickName +'：</a>'+
                 					'<span class="my-pl-con">'+ oAt +'</span>'+
                 				'</div>'+
                 			 '<div class="date-dz">'+ 
                 				'<span class="date-dz-left pull-left comment-time">'+ now +'</span>'+ 
                 				'<div class="date-dz-right pull-right comment-pl-block">'+ 
                 					'<a href="javascript:;" data-id="'+ cid +'" class="removeBlock">删除</a>'+ 
                 					'<a href="javascript:;" class="date-dz-pl pl-hf hf-con-block pull-left">回复</a>'+ 
                 					'<span class="pull-left date-dz-line">|</span>'+ 
                 					'<a href="javascript:;" class="date-dz-z pull-left">'+
                 					'<i class="layui-icon layui-icon-praise"></i>'+
                 						'(<i class="z-num">0</i>)'+
                 					'</a>'+ 
                 				'</div>'+ 
                 			'</div>'+
                 		 '</div>';
                 oThis.parents('.hf-con').parents('.comment-show-con-list').find('.hf-list-con').css('display','block').prepend(oHtml) && oThis.parents('.hf-con').siblings('.date-dz-right').find('.pl-hf').addClass('hf-con-block') && oThis.parents('.hf-con').remove(); 
             }
        })
        
        <!-- 点赞 -->
        $('.comment-show').on('click','.date-dz-z',function(){
	        var zNum = $(this).find('.z-num').html();
	        var cid = $(this).data('id');
	        var _that = this;
	        if($(this).is('.date-dz-z-click')){ // 取消点赞
	        	var ajax = new $ax('/zp/commsup/unpraise/' + cid, 'post', function (res) {
	        		zNum--;
		            $(_that).removeClass('date-dz-z-click red');
		            $(_that).find('.z-num').html(zNum);
		            $(_that).find('.date-dz-z-click-red').removeClass('red');
			    }, function (res) {
			    	mynotice.error(res.msg);
			    });
			    ajax.start();
	        }else { // 点赞
	        	var ajax = new $ax('/zp/commsup/praise/' + cid, 'post', function (res) {
	        		zNum++;
		            $(_that).addClass('date-dz-z-click');
		            $(_that).find('.z-num').html(zNum);
		            $(_that).find('.date-dz-z-click-red').addClass('red');
			    }, function (res) {
			    	mynotice.error(res.msg);
			    });
			    ajax.start();
	        }
   		})
   		
   		<!-- 删除 -->
   		$('.commentAll').on('click','.removeBlock',function(){
   			var cid = $(this).data('id');
   			var _that = this;
   			var ajax = new $ax('/zp/comment/del/' + cid, 'delete', function (res) {
   				var oT = $(_that).parents('.date-dz-right').parents('.date-dz').parents('.all-pl-con');
   		        if(oT.siblings('.all-pl-con').length >= 1){
   		            oT.remove();
   		        }else {
   		            $(_that).parents('.date-dz-right').parents('.date-dz').parents('.all-pl-con').parents('.hf-list-con').css('display','none')
   		            oT.remove();
   		        }
   		        $(_that).parents('.date-dz-right').parents('.date-dz').parents('.comment-show-con-list').parents('.comment-show-con').remove();
		    }, function (res) {
		    	mynotice.error(res.msg);
		    });
		    ajax.start();
	    })
     	
  })
</script>

<script type="text/html" id="commres">
<div class="comment-show-con clearfix" data-id="{{d.cid}}">
	<a class="comment-show-con-img pull-left" target="_blank" href="/t/{{d.user.userId}}">
		<img src="{{d.user.avatar}}" class="avatarimg" alt="">
	</a>
	<div class="comment-show-con-list pull-left clearfix">
		<div class="pl-text clearfix">
			<a href="/t/{{d.user.userId}}" target="_blank" data-cid="{{d.cid}}" data-id="{{d.user.userId}}" class="comment-size-name">{{d.user.nickName}}：</a>
			<span class="my-pl-con">&nbsp;{{d.content}}</span>
		</div>
		<div class="date-dz">
			<span class="date-dz-left pull-left comment-time">{{d.time}}</span>
			<div class="date-dz-right pull-right comment-pl-block">
				{{# if(d.own){ }}
					<a href="javascript:;" data-id="{{d.cid}}" class="removeBlock">删除</a>
				{{#  } }}
				<a href="javascript:;" class="date-dz-pl pl-hf pull-left hf-con-block">回复</a>
				<span class="pull-left date-dz-line">|</span>
				{{# if(d.support){ }}
					<a href="javascript:;" data-id="{{d.cid}}" class="date-dz-z pull-left date-dz-z-click">
						<i class="layui-icon layui-icon-praise"></i> 
						(<i class="z-num">{{d.likes}}</i>)
					</a>
				{{# } else { }}
					<a href="javascript:;" data-id="{{d.cid}}" class="date-dz-z pull-left">
						<i class="layui-icon layui-icon-praise"></i> 
						(<i class="z-num">{{d.likes}}</i>)
					</a>
				{{#  } }}
			</div>
		</div>
		<div class="hf-list-con" style="display: block;">
			{{# layui.each(d.replyVos, function(index, item){ }}
				<div class="all-pl-con">
					<div class="pl-text hfpl-text clearfix">
						<a href="/t/{{item.respondents.userId}}" target="_blank" data-cid="{{item.cid}}" data-id="{{item.respondents.userId}}" class="comment-size-name">{{item.respondents.nickName}}：</a>
						<span class="my-pl-con">回复<a href="/t/{{item.user.userId}}" target="_blank" class="atName">{{item.user.nickName}}</a> : {{item.content}}</span>
					</div>
					<div class="date-dz">
						<span class="date-dz-left pull-left comment-time">{{item.time}}</span>
						<div class="date-dz-right pull-right comment-pl-block">
							{{# if(item.own){ }}
								<a href="javascript:;" data-id="{{item.cid}}" class="removeBlock">删除</a>
							{{#  } }}
							<a href="javascript:;" class="date-dz-pl pl-hf hf-con-block pull-left">回复</a>
							<span class="pull-left date-dz-line">|</span>
							{{# if(item.support){ }}
								<a href="javascript:;" data-id="{{item.cid}}" class="date-dz-z pull-left date-dz-z-click">
									<i class="layui-icon layui-icon-praise"></i> 
									(<i class="z-num">{{item.likes}}</i>)
								</a>
							{{# } else { }}
								<a href="javascript:;" data-id="{{item.cid}}" class="date-dz-z pull-left">
									<i class="layui-icon layui-icon-praise"></i> 
									(<i class="z-num">{{item.likes}}</i>)
								</a>
							{{#  } }}
						</div>
					</div>
				</div>
			{{# }); }}
		</div>
	</div>
</div>

</script>
	
</body>
</html>